<!-- 找到111 222 333 444 -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //1. i进行循环  判断i%111==0
      for (var i = 100; i <= 999; i++) {
        var a = parseInt(i / 100);
        var b = parseInt((i % 100) / 10);
        var c = i % 10;
        if (c == b && b == a && c == a) {
          document.write(i);
          document.write("<br>");
        }
      }
    </script>
  </body>
</html>
